package com.mes.task.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.ForeignKey;
import org.hibernate.annotations.Formula;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.JoinColumnOrFormula;
import org.hibernate.annotations.JoinColumnsOrFormulas;
import org.hibernate.annotations.JoinFormula;
import org.hibernate.annotations.Where;
import org.springframework.context.annotation.Lazy;

import com.mes.basicdata.domain.Dept;
import com.mes.basicdata.domain.Employee;
import com.mes.basicdata.domain.Part;
import com.mes.basicdata.domain.TypesData;
import com.mes.common.domain.BasicModel;
import com.mes.inventory.domain.Warehouse;

/**
 * <p>
 * Demand实体，表示请制部门向主制部门的需求
 * </p>
 * author lcs data 2017-03-19
 * 
 */
@Entity()
@Table(name = "T_DEMAND")
@BatchSize(size = 20)
@Lazy(value = true)
@Where(clause = "demandtype like '61%'")
public class Demand extends BasicModel {

	private static final long serialVersionUID = -7916999565942599341L;
	public final static int DEMANDSTATE_CANCELED = 3; //已取消
	public final static int DEMANDSTATE_FINISHED = 2; //已完成
	public final static int DEMANDSTATE_CONSULTING = 4; //待确认
	public final static int DEMANDSTATE_AGREE = 5; //可接受
	public final static int DEMANDSTATE_DISAGREE = 6; //带协调
	public final static int DEMANDSTATE_DRAFT= 0; //草稿
	public final static int DEMANDSTATE_STARTED = 1; //已下达
	public final static int DEMANDSTATE_ASSEMBLED = 7; //已齐套
	
	public final static String DEMANDTYPE_WORKORDER = "600";//年度生产大纲
	public final static String DEMANDTYPE_SALE_ORDER = "601";//销售订单
	public final static String DEMANDTYPE_PART_ORDER = "602";//零件车间生产订单
	public final static String DEMANDTYPE_ASSEMBLY_ORDER = "603";//装配车间生产订单
	public final static String DEMANDTYPE_PART_MPS = "604";//零件主生产计划
	public final static String DEMANDTYPE_ASSEMBLY_MPS = "605";//装配主生产计划
	public final static String DEMANDTYPE_ASSEMBLY_FULLSET = "606";//装配齐套需求计划
	public final static String DEMANDTYPE_ORDER = "610";//订单指令
	public final static String DEMANDTYPE_MISSING_PART = "611";//缺件指令
	public final static String DEMANDTYPE_AO_ASSEMBLY_MPS = "612";//装配主生产计划
	
	public final static String DEMANDTYPE_NORMAL = "301"; //正常指令
	
	public final static int DEMANDMATERIALSTATE_READY = 100; //正常
	public final static int DEMANDMATERIALSTATE_NOTREADY = 101; //拖期

	/**
	 * 订单预警状态 hba
	 */
	public final static int DEMANDWARNSTATESTATE_WARN = 1; // 订单可预警
	public final static int DEMANDWARNSTATESTATE_PAUSEWARN = 0; // 订单暂停预警

	@Id
	@GenericGenerator(name = "demandUid", strategy = "assigned")
	@Column(name = "DEMANDUID")
	protected String demandUid;

	/**
	 * 类型与状态映射--demandstate
	 */
	@Column(name = "DEMANDSTATE", precision = 20, scale = 6)
	protected Integer demandState;

	@Transient
	protected TypesData demandStateDesc;

	@Column(name = "RESPONSETIME", precision = 10, scale = 0)
	protected Integer responseTime;
	/*
	 * 该指令是否分解
	 */
	@Column(name = "ISBREAK", length = 10)
	protected Boolean isBreak;

	@Column(name = "ISCRITICAL", length = 10)
	protected Integer isCritical;

	@Column(name = "READYPOINT", precision = 2, scale = 0)
	protected Integer readyPoint;

	@Column(name = "PART_NUMBER")
	protected String partUid;
	/**
	 * 复杂对象映射--part
	 */
	// many-to-one
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PART_NUMBER", insertable = false, updatable = false)
	protected Part part;

	// 对应物料的图号
	@Column(name = "PART_DRAWINGID")
	protected String partDrawingId;
	// 对应物料的名称
	@Column(name = "PART_NAME")
	protected String partName;
	// 对应物料的版次
	@Column(name = "PART_VERSIONID")
	protected String partVersionId;
	
	@Transient
	protected String workOrderUid;
	/**
	 * 复杂对象映射--workOrder
	 */
	// many-to-one
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "WAREHOUSEID", insertable = false, updatable = false)
	protected WorkOrder workOrder;

	@Transient
	protected String mdsUid;
	/**
	 * 复杂对象映射--mds
	 * 注释日期 2017/7/18 snowbear
	 */
/*	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "SUPERDEPTID", insertable = false, updatable = false)*/
	@Transient
	protected Mds mds;

	@Column(name = "DEMANDID")
	protected String demandId;

	@Column(name = "MODEL")
	protected String model;

	@Column(name = "BATCHNUM")
	protected String batchNum;

	@Transient
	protected String rootBatchnum;

	@Column(name = "DUEQTY", precision = 25, scale = 6)
	protected Float dueQty;

	@Column(name = "PLANQTY", precision = 25, scale = 6)
	protected Float planQty;
	/**
	 * 类型与状态映射--priority
	 */
	@Column(name = "PRIORITY")
	protected Integer priority;

	// many-to-one
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumnsOrFormulas(value = {
			@JoinColumnOrFormula(column = @JoinColumn(name = "PRIORITY", referencedColumnName = "ID", nullable = true, insertable = false, updatable = false)),
			@JoinColumnOrFormula(formula = @JoinFormula(value = "'prio'", referencedColumnName = "TYPESNAME")) })
	protected TypesData priorityDesc;

	@Column(name = "EARLYSTART", length = 7)
	protected Date earlyStart;

	@Column(name = "EARLYFINISH", length = 7)
	protected Date earlyFinish;

	@Column(name = "LATESTART", length = 7)
	protected Date lateStart;

	@Column(name = "LATEFINISH", length = 7)
	protected Date lateFinish;

	@Column(name = "ACTUALSTART", length = 7)
	protected Date actualStart;

	@Column(name = "ACTUALFINISH", length = 7)
	protected Date actualFinish;

	@Column(name = "COMPLETEPERCENT", precision = 25, scale = 6)
	protected Float completePercent;

	/**
	 * 类型与状态映射--Demandtype
	 */
	@Column(name = "DEMANDTYPE", length = 50)
	protected String demandType;

	// many-to-one
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumnsOrFormulas(value = {
			@JoinColumnOrFormula(column = @JoinColumn(name = "DEMANDTYPE", referencedColumnName = "ID", nullable = true, insertable = false, updatable = false)),
			@JoinColumnOrFormula(formula = @JoinFormula(value = "'demandtype'", referencedColumnName = "TYPESNAME")) })
	protected TypesData demandTypeDesc;

	@Column(name = "DELIVERYQTY", precision = 25, scale = 6)
	protected Float deliveryQty;

	@Formula("(select nvl(sum(tl.linkqty),0) from t_demandtasklinks tl where tl.succuid=DemandUid)")
	protected Float arrangeQty;

	@Formula("(select dueQty-(select nvl(sum(tl.linkqty),0) from t_demandtasklinks tl where tl.succuid=DemandUid ) from t_demand t where t.demanduid = DemandUid)")
	protected Float remainQty;

	@Column(name = "DEPTID")
	protected String deptUid;
	/**
	 * 复杂对象映射--dept
	 */
	// many-to-one
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "DEPTID", insertable = false, updatable = false)
	protected Dept dept;

	@Column(name = "MASTERSHOP")
	protected String masterShopUid;

	/**
	 * 复杂对象映射--mastershop
	 */
	// many-to-one
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MASTERSHOP", insertable = false, updatable = false)
	protected Dept masterShop;

	@Transient
	protected String reasonCode;

	/**
	 * 类型与状态映射--routinestate
	 */
	@Transient
	protected Integer routineState;

	@Transient
	protected TypesData routineStateDesc;

	/**
	 * 类型与状态映射--materialstate
	 * 
	 */
	@Column(name = "MATERIALSTATE", precision = 5, scale = 0)
	protected Integer materialState;

	// many-to-one
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumnsOrFormulas(value = {
			@JoinColumnOrFormula(column = @JoinColumn(name = "MATERIALSTATE", referencedColumnName = "ID", nullable = true, insertable = false, updatable = false)),
			@JoinColumnOrFormula(formula = @JoinFormula(value = "'materialstate'", referencedColumnName = "TYPESNAME")) })
	protected TypesData materialStateDesc;

	/**
	 * 类型与状态映射--resourcestate
	 */
	@Transient
	protected Integer resourceState;

	@Transient
	protected TypesData resourceStateDesc;

	@Transient
	protected Float completeWork;

	@Column(name = "WAREHOUSEID", length = 50)
	protected String wareHouseUid;
	// many-to-one
	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "WAREHOUSEID", insertable = false, updatable = false)
	protected Warehouse wareHouse;

	@Transient
	protected String bigModel;

	@Formula("(select max(t.planFinish) from t_demandtasklinks tl inner join t_tasks t on tl.preduid=t.taskuid where tl.succuid=DemandUid  and tl.isIneffect=1 and t.taskstate<106)")
	protected Date planFinish;

	@Transient
	protected String parentDemandUid;

	// many-to-one
/*	@ForeignKey(name = "null")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "SUPERDEPTID", insertable = false, updatable = false)*/
	@Transient
	protected Demand parentDemand;

	@Column(name = "EffectSchedule", precision = 1, scale = 0)
	private Integer effectSchedule;

	@Column(name = "ROUTING")
	private String routingUid;

	@Column(name = "DEMAND_MANAGER")
	private String demandManagerUid;

	// 架次号
	@Column(name = "CONTIGNATION_NUMBER")
	private String contignationNumber;
	
	@Column(name = "PLANSTART")
	private Date planStart;

	public String getParentDemandUid() {
		return parentDemandUid;
	}

	public void setParentDemandUid(String parentDemandUid) {
		this.parentDemandUid = parentDemandUid;
	}

	/*public Demand getParentDemand() {
		return parentDemand;
	}

	public void setParentDemand(Demand parentDemand) {
		this.parentDemand = parentDemand;
	}*/

	/**
	 * 获取物料项Uid
	 * 
	 * @return
	 */

	public String getPartUid() {
		return partUid;
	}

	/**
	 * 设置物料项Uid
	 * 
	 * @param partUid
	 */
	public void setPartUid(String partUid) {
		this.partUid = partUid;
	}

	/**
	 * 获取指令的id,每个指令的别名
	 * 
	 * @return
	 */

	public String getDemandId() {
		return demandId;

	}

	/**
	 * 设置指令的id，,每个指令的别名
	 * 
	 * @param Demandid
	 */
	public void setDemandId(String demandId) {
		this.demandId = demandId;
	}

	/**
	 * 获取型号
	 * 
	 * @return
	 */

	public String getModel() {
		return model;

	}

	/**
	 * 设置型号
	 * 
	 * @param model
	 */
	public void setModel(String model) {
		this.model = model;
	}

	/**
	 * 获取批次号
	 * 
	 * @return
	 */

	public String getBatchNum() {
		return batchNum;

	}

	/**
	 * 设置批次号
	 * 
	 * @param batchnum
	 */
	public void setBatchNum(String batchNum) {
		this.batchNum = batchNum;
	}

	/**
	 * 获取需求数量
	 * 
	 * @return
	 */
	public Float getDueQty() {
		return dueQty;
	}

	/**
	 * 设置需求数量
	 * 
	 * @param dueqty
	 */
	public void setDueQty(Float dueQty) {
		this.dueQty = dueQty;
	}

	/**
	 * 获取优先级
	 * 
	 * @return
	 */
	public Integer getPriority() {
		return priority;
	}

	/**
	 * 设置优先级
	 * 
	 * @param priority
	 */
	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	/**
	 * 获取最早开始时间
	 * 
	 * @return
	 */
	public Date getEarlyStart() {
		return earlyStart;
	}

	/**
	 * 设置最早开始时间
	 * 
	 * @param earlystart
	 */
	public void setEarlyStart(Date earlyStart) {
		this.earlyStart = earlyStart;
	}

	/**
	 * 获取最早结束时间
	 * 
	 * @return
	 */
	public Date getEarlyFinish() {
		return earlyFinish;
	}

	/**
	 * 设置最早结束时间
	 * 
	 * @param earlyfinish
	 */
	public void setEarlyFinish(Date earlyFinish) {
		this.earlyFinish = earlyFinish;
	}

	/**
	 * 获取最晚开始时间
	 * 
	 * @return
	 */
	public Date getLateStart() {
		return lateStart;
	}

	/**
	 * 设置最晚开始时间
	 * 
	 * @param latestart
	 */
	public void setLateStart(Date lateStart) {
		this.lateStart = lateStart;
	}

	/**
	 * 获取最晚结束时间
	 * 
	 * @return
	 */
	public Date getLateFinish() {
		return lateFinish;
	}

	/**
	 * 设置最晚结束时间
	 * 
	 * @param latefinish
	 */
	public void setLateFinish(Date lateFinish) {
		this.lateFinish = lateFinish;
	}

	/**
	 * 获取实际开始时间
	 * 
	 * @return
	 */
	public Date getActualStart() {
		return actualStart;
	}

	/**
	 * 设置实际开始时间
	 * 
	 * @param actualstart
	 */
	public void setActualStart(Date actualStart) {
		this.actualStart = actualStart;
	}

	/**
	 * 获取实际结束时间
	 * 
	 * @return
	 */
	public Date getActualFinish() {
		return actualFinish;
	}

	/**
	 * 设置实际结束时间
	 * 
	 * @param actualfinish
	 */
	public void setActualFinish(Date actualFinish) {
		this.actualFinish = actualFinish;
	}

	/**
	 * 获取完成百分比
	 * 
	 * @return
	 */
	public Float getCompletePercent() {
		return completePercent;
	}

	/**
	 * 设置完成百分比
	 * 
	 * @param completepercent
	 */
	public void setCompletePercent(Float completePercent) {
		this.completePercent = completePercent;
	}

	/**
	 * 获取指令类型
	 * 
	 * @return
	 */
	public String getDemandType() {
		return demandType;
	}

	/**
	 * 设置指令类型
	 * 
	 * @param Demandtype
	 */
	public void setDemandType(String demandType) {
		this.demandType = demandType;
	}

	/**
	 * 获取已交付数量
	 * 
	 * @return
	 */
	public Float getDeliveryQty() {
		return deliveryQty;
	}

	/**
	 * 设置已交付数量
	 * 
	 * @param deliveryqty
	 */
	public void setDeliveryQty(Float deliveryQty) {
		this.deliveryQty = deliveryQty;
	}

	/**
	 * 获取部门部门Uid
	 * 
	 * @return
	 */
	public String getDeptUid() {
		return deptUid;
	}

	/**
	 * 设置部门Uid
	 * 
	 * @param deptUid
	 */
	public void setDeptUid(String deptUid) {
		this.deptUid = deptUid;
	}

	/**
	 * 获取主制车间Uid
	 * 
	 * @return
	 */
	public String getMasterShopUid() {
		return masterShopUid;
	}

	/**
	 * 设置主制车间Uid
	 * 
	 * @param mastershopUid
	 */
	public void setMasterShopUid(String masterShopUid) {
		this.masterShopUid = masterShopUid;
	}

	/**
	 * 获取指令状态
	 * 
	 * @return
	 */
	public Integer getDemandState() {
		return demandState;
	}

	/**
	 * 设置指令状态
	 * 
	 * @param demandState
	 */
	public void setDemandState(Integer demandState) {
		this.demandState = demandState;
	}

	/**
	 * 获取工艺状态
	 * 
	 * @return
	 */
	public Integer getRoutineState() {
		return routineState;
	}

	/**
	 * 设置工艺状态
	 * 
	 * @param routinestate
	 */
	public void setRoutineState(Integer routineState) {
		this.routineState = routineState;
	}

	/**
	 * 获取物料状态
	 * 
	 * @return
	 */
	public Integer getMaterialState() {
		return materialState;
	}

	/**
	 * 设置物料状态
	 * 
	 * @param materialstate
	 */
	public void setMaterialState(Integer materialState) {
		this.materialState = materialState;
	}

	/**
	 * 获取资源状态
	 * 
	 * @return
	 */
	public Integer getResourceState() {
		return resourceState;
	}

	/**
	 * 设置资源状态
	 * 
	 * @param resourceState
	 */
	public void setResourceState(Integer resourceState) {
		this.resourceState = resourceState;
	}

	/**
	 * 获取完成工时
	 * 
	 * @return
	 */
	public Float getCompleteWork() {
		return completeWork;
	}

	/**
	 * 设置完成工时
	 * 
	 * @param completework
	 */
	public void setCompleteWork(Float completeWork) {
		this.completeWork = completeWork;
	}

	/**
	 * 获取要交付的库房编号
	 * 
	 * @return
	 */
	public String getWareHouseUid() {
		return wareHouseUid;
	}

	/**
	 * 设置要交付的库房编号
	 * 
	 * @param warehouseUid
	 */
	public void setWareHouseUid(String wareHouseUid) {
		this.wareHouseUid = wareHouseUid;
	}

	/**
	 * 获取要交付的库房对象
	 * 
	 * @return
	 */
	public Warehouse getWareHouse() {
		return wareHouse;
	}

	/**
	 * 设置要交付的库房对象
	 * 
	 * @param warehouse
	 */
	public void setWareHouse(Warehouse wareHouse) {
		this.wareHouse = wareHouse;
	}

	/**
	 * 获取机型
	 * 
	 * @return
	 */
	public String getBigModel() {
		return bigModel;
	}

	/**
	 * 设置机型
	 * 
	 * @param bigmodel
	 */
	public void setBigModel(String bigModel) {
		this.bigModel = bigModel;
	}

	/**
	 * 获取物料项对象
	 * 
	 * @return
	 */
	public Part getPart() {
		return part;
	}

	/**
	 * 设置物料项对象
	 * 
	 * @param part
	 */
	public void setPart(Part part) {
		this.part = part;
	}

	/**
	 * 获取优先级描述
	 * 
	 * @return
	 */
	public TypesData getPriorityDesc() {
		return priorityDesc;
	}

	/**
	 * 设置优先级描述
	 * 
	 * @param priorityDesc
	 */
	public void setPriorityDesc(TypesData priorityDesc) {
		this.priorityDesc = priorityDesc;
	}

	/**
	 * 获取指令类型描述
	 * 
	 * @return
	 */
	public TypesData getDemandTypeDesc() {
		return demandTypeDesc;
	}

	/**
	 * 设置指令类型描述
	 * 
	 * @param DemandTypeDesc
	 */
	public void setDemandTypeDesc(TypesData demandTypeDesc) {
		this.demandTypeDesc = demandTypeDesc;
	}

	/**
	 * 获取部门对象
	 * 
	 * @return
	 */
	public Dept getDept() {
		return dept;
	}

	/**
	 * 设置部门对象
	 * 
	 * @param dept
	 */
	public void setDept(Dept dept) {
		this.dept = dept;
	}

	/**
	 * 获取创建者对象
	 * 
	 * @return
	 */
	public Employee getCreator() {
		return creator;
	}

	/**
	 * 设置创建者对象
	 * 
	 * @param creator
	 */
	public void setCreator(Employee creator) {
		this.creator = creator;
	}

	/**
	 * 获取主制车间对象
	 * 
	 * @return
	 */
	public Dept getMasterShop() {
		return masterShop;
	}

	/**
	 * 设置主制车间对象
	 * 
	 * @param mastershop
	 */
	public void setMasterShop(Dept masterShop) {
		this.masterShop = masterShop;
	}

	/**
	 * 获取工艺状态描述
	 * 
	 * @return
	 */
	public TypesData getRoutineStateDesc() {
		return routineStateDesc;
	}

	/**
	 * 设置工艺状态描述
	 * 
	 * @param routineStateDesc
	 */
	public void setRoutineStateDesc(TypesData routineStateDesc) {
		this.routineStateDesc = routineStateDesc;
	}

	/**
	 * 获取物料状态描述
	 * 
	 * @return
	 */
	public TypesData getMaterialStateDesc() {
		return materialStateDesc;
	}

	/**
	 * 设置物料状态描述
	 * 
	 * @param materialStateDesc
	 */
	public void setMaterialStateDesc(TypesData materialStateDesc) {
		this.materialStateDesc = materialStateDesc;
	}

	/**
	 * 获取资源状态描述
	 * 
	 * @return
	 */
	public TypesData getResourceStateDesc() {
		return resourceStateDesc;
	}

	/**
	 * 设置资源状态描述
	 * 
	 * @param resourceStateDesc
	 */
	public void setResourceStateDesc(TypesData resourceStateDesc) {
		this.resourceStateDesc = resourceStateDesc;
	}

	/**
	 * 获取需求状态描述
	 * 
	 * @return
	 */
	public TypesData getDemandStateDesc() {
		return demandStateDesc;
	}

	/**
	 * 设置需求状态描述
	 * 
	 * @param demandStateDesc
	 */
	public void setDemandStateDesc(TypesData demandStateDesc) {
		this.demandStateDesc = demandStateDesc;
	}

	/**
	 * 获取两下一上指令下达的响应时限
	 * 
	 * @return
	 */
	public Integer getResponseTime() {
		return responseTime;
	}

	/**
	 * 设置"两下一上"指令下达的响应时限
	 * 
	 * @param ResponseTime
	 */
	public void setResponseTime(Integer responseTime) {
		this.responseTime = responseTime;
	}

	/**
	 * 返回已经安排的数量
	 * 
	 * @return the arrangeQty
	 */
	public Float getArrangeQty() {
		return arrangeQty;
	}

	/**
	 * 设置已经安排的数量
	 * 
	 * @param arrangeQty
	 *            the arrangeQty to set
	 */
	public void setArrangeQty(Float arrangeQty) {
		this.arrangeQty = arrangeQty;
	}

	/**
	 * 返回原因编号
	 * 
	 * @return the reasonCode
	 */
	public String getReasonCode() {
		return reasonCode;
	}

	/**
	 * 设置原因编号
	 * 
	 * @param reasonCode
	 *            the reasonCode to set
	 */
	public void setReasonCode(String reasonCode) {
		this.reasonCode = reasonCode;
	}

	public Date getPlanFinish() {
		return planFinish;
	}

	/**
	 * 设置预计完成时间，只读，不能存入数据库
	 * 
	 * @param planFinish
	 *            the planFinish to set
	 **/
	public void setPlanFinish(Date planFinish) {
		this.planFinish = planFinish;
	}

	public String getRootBatchnum() {
		return rootBatchnum;
	}

	public void setRootBatchnum(String rootBatchnum) {
		this.rootBatchnum = rootBatchnum;
	}

	public Boolean getIsBreak() {
		return isBreak;
	}

	public void setIsBreak(Boolean isBreak) {
		this.isBreak = isBreak;
	}

	public String getWorkOrderUid() {
		return workOrderUid;
	}

	public void setWorkOrderUid(String workOrderUid) {
		this.workOrderUid = workOrderUid;
	}

	public WorkOrder getWorkOrder() {
		return workOrder;
	}

	public void setWorkOrder(WorkOrder workOrder) {
		this.workOrder = workOrder;
	}

	public String getMdsUid() {
		return mdsUid;
	}

	public void setMdsUid(String mdsUid) {
		this.mdsUid = mdsUid;
	}

	/*public Mds getMds() {
		return mds;
	}

	public void setMds(Mds mds) {
		this.mds = mds;
	}*/

	public Float getRemainQty() {
		return remainQty;
	}

	public void setRemainQty(Float remainQty) {
		this.remainQty = remainQty;
	}

	public Float getPlanQty() {
		return planQty;
	}

	public void setPlanQty(Float planQty) {
		this.planQty = planQty;
	}

	public Integer getIsCritical() {
		return isCritical;
	}

	public void setIsCritical(Integer isCritical) {
		this.isCritical = isCritical;
	}

	public String getDemandUid() {
		return demandUid;
	}

	public void setDemandUid(String demandUid) {
		this.demandUid = demandUid;
	}

	@Override
	public String getUuid() {
		// TODO Auto-generated method stub
		return this.demandUid;
	}

	@Override
	public void setUuid(String uuid) {
		// TODO Auto-generated method stub
		this.demandUid = uuid;
	}

	public Integer getReadyPoint() {
		return readyPoint;
	}

	public void setReadyPoint(Integer readyPoint) {
		this.readyPoint = readyPoint;
	}

	public String getRoutingUid() {
		return routingUid;
	}

	public void setRoutingUid(String routingUid) {
		this.routingUid = routingUid;
	}

	public String getDemandManagerUid() {
		return demandManagerUid;
	}

	public void setDemandManagerUid(String demandManagerUid) {
		this.demandManagerUid = demandManagerUid;
	}

	public Integer getEffectSchedule() {
		return effectSchedule;
	}

	public void setEffectSchedule(Integer effectSchedule) {
		this.effectSchedule = effectSchedule;
	}

	public String getContignationNumber() {
		return contignationNumber;
	}

	public void setContignationNumber(String contignationNumber) {
		this.contignationNumber = contignationNumber;
	}

	public String getPartDrawingId() {
		return partDrawingId;
	}

	public void setPartDrawingId(String partDrawingId) {
		this.partDrawingId = partDrawingId;
	}

	public String getPartName() {
		return partName;
	}

	public void setPartName(String partName) {
		this.partName = partName;
	}

	public String getPartVersionId() {
		return partVersionId;
	}

	public void setPartVersionId(String partVersionId) {
		this.partVersionId = partVersionId;
	}

	public Date getPlanStart() {
		return planStart;
	}

	public void setPlanStart(Date planStart) {
		this.planStart = planStart;
	}
	
	
}
